test_cases = [
    ("", 0, ""),
    ("abcde", 1, "bcdea"),
    ("abcdef", 3, "defabc"),
    ("hello", 5, "hello"),
    ("world", 2, "rldwo"),
    ("python", 4, "onpyth")
]

def test_dynamicPassword():
    for password, target, expected in test_cases:
        result = dynamicPassword(password, target)
        assert result == expected, f"Failed: {password}, {target}, expected {expected}, got {result}"
    print("All tests passed!")